<?php
	require_once('databaseFunctions.php');
	class Connection {
		private static $conn;

		private function __construct() {
		}

		private function  __clone() {
		}

		public static function init() {
			if (NULL == self::$conn) {
				self::$conn = new PDO('mysql:host=localhost;dbname=elena;charset=utf8', 'root', '');
				self::$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
			}
		}
		
		public function getConnection(){
			return self::$conn;
		}
	}
?>